﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Class.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            账号：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="账号不能为admin" ControlToValidate="TextBox1" Display="Dynamic" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="账号不能为空" ControlToValidate="TextBox1" Display="Dynamic" Font-Bold="True" ForeColor="#CC0000"></asp:RequiredFieldValidator>
            <br />
            密码：<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="密码不能为空" ControlToValidate="TextBox2" ></asp:RequiredFieldValidator>
            <br />
            确认密码：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="输入密码与前面不符" ControlToCompare="TextBox2" ControlToValidate="TextBox3" Display="Dynamic"></asp:CompareValidator>
            <br />
            年龄：<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox><asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="年龄必须在0~150岁之间！" ControlToValidate="TextBox4" MaximumValue="150" MinimumValue="0" Type="Integer"></asp:RangeValidator>
           <br />
            出生日期：<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox><asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="日期范围超出1990-01-01~当前日期" ControlToValidate="TextBox5" Display="Dynamic" MinimumValue="1900-01-01" Type="Date"></asp:RangeValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="日期格式必须为：2000-01-01" ControlToValidate="TextBox5" ValidationExpression="&quot;\d{4}-\d{2}-\d{2}&quot;"></asp:RegularExpressionValidator>
           <br />
            毕业日期：<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox><asp:CompareValidator ID="CompareValidator2" runat="server" ErrorMessage="毕业时间不能早于或等于出生时间" ControlToCompare="TextBox5" ControlToValidate="TextBox6" Operator="GreaterThan" Type="Date"></asp:CompareValidator>
           <br />
            头像：<asp:FileUpload ID="ful" runat="server" />
            <br />
            <asp:Button ID="Button1" runat="server" Text="提交" />
            <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            <br />
          </div>
    </form>
</body>
</html>
